//
//  OurClass.m
//  OCDay08homework
//
//  Created by dllo on 16/5/31.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "OurClass.h"
#import "Teacher.h"
@implementation OurClass


-(instancetype)initWithTeacher:(Teacher *)teacher withStudentArray:(NSMutableArray *)studentArray{
    self = [super init];
    if(self){
        self.teacher = teacher;
        if(studentArray == nil){
            self.studentArray = [NSMutableArray array];
        }else{
            self.studentArray = studentArray;
        }
    }
    return self;
}

-(void)addStudent:(Student *)student{
    [self.studentArray addObject:student];
}

-(void)removeStudent:(Student *)student{
    [self.studentArray removeObject:student];
}

@end
